﻿using LuShanTea.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LuShanTea.IService
{
    public interface ICityService : IServiceSupport
    {
        /// <summary>
        /// 添加市
        /// </summary>
        /// <param name="name"></param>
        /// <param name="proId"></param>
        /// <returns></returns>
        long AddNew(string name,long proId);
        /// <summary>
        /// 修改市
        /// </summary>
        /// <param name="name"></param>
        /// <param name="proId"></param>
        void Update(long cityId, string name, long proId);
        /// <summary>
        /// 删除市
        /// </summary>
        /// <param name="cityId"></param>
        void MarkDelete(long cityId);
        /// <summary>
        /// 获取所有市
        /// </summary>
        /// <returns></returns>
        CityDTO[] GetAll();
        /// <summary>
        /// 根据Id获取市
        /// </summary>
        /// <param name="cityId"></param>
        /// <returns></returns>
        CityDTO GetById(long cityId);
        /// <summary>
        /// 根据省Id查找城市
        /// </summary>
        /// <returns></returns>
        CityDTO[] GetByProvId(long provId);
        /// <summary>
        /// 根据城市名获取城市
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        CityDTO GetByName(string name);

        long GetProvinceIdByCityId(long cityId);
    }
}
